#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
#include<vector>
#include<string>

using namespace std;

string binary(string s)
{
    int x = stoi(s);
    string res;
    while (x)
    {
        if (x & 1)   res += '1';
        else res += '0';
        x >>= 1;
    }
    reverse(res.begin(), res.end());
    return res;
}
string convertDateToBinary(string date) {
    date += '-';
    string res;
    int st = 0;
    for (int i = 0; i < date.size(); i++)
        if (date[i] == '-')
        {
            string s = date.substr(st, i - st + 1);
            res += binary(s);
            res += "-";
            st = i + 1;
        }
    res.pop_back();
    return res;
}
